package com.course02.order_backend.validation.Ost.annotation;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = com.course02.order_backend.validation.Ost.validator.EmailValidator.class)
public @interface Email {
    String message() default "邮箱格式不正确（如xxx@xx.com）";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}